Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: allow Omnichannel Chats to be placed onHold even when the last message is not from the Agent #30527

Merged
merged 23 commits into from
Nov 1, 2023

Conversation

cabaceira
Copy link
Contributor

@cabaceira cabaceira commented Sep 29, 2023

Currently, the behaviour of our Rocket.Chat Omnichannel only allows to place On-Hold chats where the last message was sent by the Agent. Amerisave (and other customers) asked for the ability to place chats on hold at anytime, not only when the agent was the last one that has sent a message.

The reason for this behaviour is that our code actually enforces this condition (that the agent was the last one to have sent a message) to show the option to place the chat on-hold.

Proposed changes

The changes proposed on the current PR involve removing the condition (that the agent was the last one to have sent a message) from our code.

image

Issue(s)

The Jira issue that is related to this PR is CC-13

Steps to test or reproduce

  • Deploy Rocket.Chat with an enterprise license and enable omnichannel setting to allow placing chats onHold.
  • Create a new Chat (use the /livechat url) and add a user to start a conversation.
  • Verify that the Agent is only able to place the chat onHold when the last message was sent by him, otherwise the action button is not visible.

Further comments

Showing new settings and the interdependency between them.

video-new-settings-clean.mov

Showing both options working individually, depending on the settings.

video-settings-working.mov

CC-13
PROSVC-23

…n hold by the agent even when the last message was not sent by him
@cabaceira cabaceira requested a review from a team as a code owner September 29, 2023 14:23
@changeset-bot
Copy link

changeset-bot bot commented Sep 29, 2023

⚠️ No Changeset found

Latest commit: 31427d2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant
Copy link

CLAassistant commented Sep 29, 2023

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Merging #30527 (31427d2) into develop (7342800) will decrease coverage by 1.80%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #30527      +/-   ##
===========================================
- Coverage    51.21%   49.42%   -1.80%     
===========================================
  Files          814      777      -37     
  Lines        15050    14835     -215     
  Branches      2732     2729       -3     
===========================================
- Hits          7708     7332     -376     
- Misses        6933     7094     +161     
  Partials       409      409              
Flag Coverage Δ
e2e 46.36% <ø> (-2.12%) ⬇️
unit 64.50% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@renatobecker renatobecker added this to the 6.5.0 milestone Sep 29, 2023
…or or the new one, enabling Agents to place chats onHold at anytime
@cabaceira cabaceira requested a review from a team as a code owner October 3, 2023 10:18
@renatobecker renatobecker marked this pull request as draft October 3, 2023 13:53
@cabaceira cabaceira force-pushed the omnichannel/chats-onHold-action-consolidation branch from 5c468dc to d090dbe Compare October 3, 2023 14:21
@renatobecker renatobecker added the squad: Professional Services Professional Services label Oct 6, 2023
Copy link
Contributor

@KevLehman KevLehman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! If you can, on your editor install Prettier & Prettier-eslint (if on vscode) so you can automatically fix the lint errors that popped up :)

Copy link
Member

@rodrigok rodrigok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cabaceira please fix the TS and Lint errors

Copy link
Contributor

@MartinSchoeler MartinSchoeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…refactored names of constants, reviewed lint
@cabaceira cabaceira force-pushed the omnichannel/chats-onHold-action-consolidation branch from 49509fd to 96cf998 Compare October 23, 2023 17:56
@cabaceira cabaceira force-pushed the omnichannel/chats-onHold-action-consolidation branch from ed45988 to 284740d Compare October 24, 2023 12:39
@cabaceira cabaceira force-pushed the omnichannel/chats-onHold-action-consolidation branch from 88ac9c0 to 74110a1 Compare October 27, 2023 16:48
@rodrigok rodrigok dismissed their stale review October 30, 2023 17:20

Dismissed

Copy link
Contributor

@KevLehman KevLehman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go with a more generic error to cover both scenarios. Also, pls add this new error to the translation files so we get a nice string there :)

@MartinSchoeler MartinSchoeler dismissed their stale review October 31, 2023 13:52

Stale, PR Changed a lot since last review

@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: needs QA labels Nov 1, 2023
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Nov 1, 2023
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Nov 1, 2023
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Nov 1, 2023
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Nov 1, 2023
@kodiakhq kodiakhq bot merged commit 542a6fe into develop Nov 1, 2023
42 of 43 checks passed
@kodiakhq kodiakhq bot deleted the omnichannel/chats-onHold-action-consolidation branch November 1, 2023 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Request Requested Feature sponsored squad: omnichannel squad: Professional Services Professional Services stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants